package com.gjl.lean;

import java.util.Scanner;

public class Test {

    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("请输入年份：");
        double year = input.nextDouble();
        System.out.print("请输入月份：");
        double month = input.nextDouble();

        if (month == 2) {
            if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) {
                System.out.println("这个月份有：29天");
            } else {
                System.out.println("这个月份有：28天");
            }
        } else if (month == 4 || month == 6 || month == 9 || month == 11) {
            System.out.println("这个月份有：30天");
        } else {
            System.out.println("这个月份有：31天");
        }
    }
}
